import random
import math

random.seed(123)
result = 0

count = eval(input(""))

for i in range(count):
    x, y = random.random(), random.random()
    d = math.sqrt(x**2 + y**2)
    if d < 1:
        result += 1

PI = 4 * (result/count)
print("{:.6f}".format(PI))
